package com.training.collections.set;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;

import com.training.collections.vo.Employee;

public class GenericsEx {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		GenericsEx nongenericsEx = new GenericsEx();
		  ArrayList<Employee> returnList = nongenericsEx.buildList();

		for (Iterator<Employee> iterator = returnList.iterator(); iterator.hasNext();) {
			Employee employee =   iterator.next();
			employee.display();
		}
	}

	public ArrayList<Employee> buildList() {
		Employee employee0 = new Employee("Naresh", "10");
		Employee employee1 = new Employee("Alex", "10");
		Employee employee2 = new Employee("Kalyan", "10");
		Employee employee3 = new Employee("Varshith", "13");
		Employee employee10 = new Employee("Naresh", "13");
		Employee employee11 = new Employee("Alex", "11");
		Employee employee12 = new Employee("Kalyan", "12");
		Employee employee13 = new Employee("Varshith", "13");

		ArrayList<Employee> arrayList = new ArrayList<Employee>();
		arrayList.add(employee0);
		arrayList.add(employee1);
		arrayList.add(employee2);
		arrayList.add(employee3);
		arrayList.add(employee10);
		arrayList.add(employee11);
		arrayList.add(employee12);
		arrayList.add(employee13);

		return arrayList;

	}

}
